package com.example.blog.service;

import com.example.blog.entity.Blog;
import com.example.blog.vo.BlogQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;


public interface BlogService {
    Blog getBlog(Long id);
    Blog getAndConvert(Long id);

    Page<Blog> listBlog(Pageable pageable, BlogQuery blog);//分页的查询；listBlog；查询一组数据
    List<Blog> listBlog();
    Page<Blog> listBlog(Pageable pageable);

    Page<Blog> listBlog(Long tagId,Pageable pageable);
    Page<Blog> listBlog(String query, Pageable pageable);
    List<Blog> listRecommendBlogTop(Integer size);
    Map<String,List<Blog>> archiveBlog();
    Long countBlog();


    Blog saveBlog(Blog blog);

    Blog updateBlog(Long id,Blog blog); //修改；根据ID修改

    void deleteBlog(Long id);


}
